package com.fimmlps.reronge.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.fimmlps.reronge.entity.EntryCollect;
import com.fimmlps.reronge.entity.EntryComment;
import com.fimmlps.reronge.mapper.EntryCollectMapper;
import com.fimmlps.reronge.service.IEntryCollectService;
import org.springframework.stereotype.Service;

@Service
public class EntryCollectServiceImpl extends ServiceImpl<EntryCollectMapper,EntryCollect> implements IEntryCollectService {
    @Override
    public EntryCollect getCollect(int userId, int entrySingleId) {
        EntryCollect collect = baseMapper.selectOne(new QueryWrapper<EntryCollect>().eq("user_id",userId).eq("entry_single_id",entrySingleId));
        return collect;
    }
}
